{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from requests_html import HTMLSession"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 学校要闻"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "session = HTMLSession()\n",
    "r = session.get(\"https://www.nfu.edu.cn/xxyw/index.htm\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "title = r.html.xpath('//div[@class=\"news_title\"]/a/@title')\n",
    "links = r.html.xpath('//div[@class=\"news_title\"]/a/@href')\n",
    "data = r.html.xpath('//font[@class=\"right-more\"]/text()')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(90):\n",
    "    r = session.get(\"https://www.nfu.edu.cn/xxyw/index%d.htm\"%(i))\n",
    "    title.extend(r.html.xpath('//div[@class=\"news_title\"]/a/@title')) \n",
    "    links.extend(r.html.xpath('//div[@class=\"news_title\"]/a/@href'))\n",
    "    data.extend(r.html.xpath('//font[@class=\"right-more\"]/text()'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>链结</th>\n",
       "      <th>日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>快！来为我校大学生国旗护卫队参赛点赞！</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/5b71d46d3b114859ae...</td>\n",
       "      <td>2021-04-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>专注当下，冲刺高考，奋斗出最美的青春</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/f9bcd8092b494a04be...</td>\n",
       "      <td>2021-04-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>我校召开高校教师职称评审 政策解读专题报告会</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/f0002a2424f34ad8b2...</td>\n",
       "      <td>2021-04-10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>我校召开2021年一流专业、一流课程、教学成果奖申报工作推进会</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/48b0929919ec4d2d9a...</td>\n",
       "      <td>2021-04-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>我校承办首届 “新时代从商培养工程”</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/0d7bd841484a42a69d...</td>\n",
       "      <td>2021-04-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1795</td>\n",
       "      <td>我院艺创系学子在广东省“和谐杯”手绘技能大赛获佳绩</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/1eca80f5d69240e491...</td>\n",
       "      <td>2013-10-14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1796</td>\n",
       "      <td>我院多个项目获2013年度省级以上本科教学质量工程项目立项</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/e2ef39bdace94f3da9...</td>\n",
       "      <td>2013-10-11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1797</td>\n",
       "      <td>首届从化地区学工部（处）联谊会在我院举行</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/5a530157f3764b32ad...</td>\n",
       "      <td>2013-09-29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1798</td>\n",
       "      <td>我院经管系2013级创新实验国际班开班典礼隆重举行</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/2af0127ce4234c7aa5...</td>\n",
       "      <td>2013-09-29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1799</td>\n",
       "      <td>学院教学工作会议顺利召开</td>\n",
       "      <td>https://www.nfu.edu.cn/xxyw/b844901be7a6412eb7...</td>\n",
       "      <td>2013-09-26</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1800 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                   标题  \\\n",
       "0                 快！来为我校大学生国旗护卫队参赛点赞！   \n",
       "1                  专注当下，冲刺高考，奋斗出最美的青春   \n",
       "2              我校召开高校教师职称评审 政策解读专题报告会   \n",
       "3     我校召开2021年一流专业、一流课程、教学成果奖申报工作推进会   \n",
       "4                  我校承办首届 “新时代从商培养工程”   \n",
       "...                               ...   \n",
       "1795        我院艺创系学子在广东省“和谐杯”手绘技能大赛获佳绩   \n",
       "1796    我院多个项目获2013年度省级以上本科教学质量工程项目立项   \n",
       "1797             首届从化地区学工部（处）联谊会在我院举行   \n",
       "1798        我院经管系2013级创新实验国际班开班典礼隆重举行   \n",
       "1799                     学院教学工作会议顺利召开   \n",
       "\n",
       "                                                     链结          日期  \n",
       "0     https://www.nfu.edu.cn/xxyw/5b71d46d3b114859ae...  2021-04-09  \n",
       "1     https://www.nfu.edu.cn/xxyw/f9bcd8092b494a04be...  2021-04-02  \n",
       "2     https://www.nfu.edu.cn/xxyw/f0002a2424f34ad8b2...  2021-04-10  \n",
       "3     https://www.nfu.edu.cn/xxyw/48b0929919ec4d2d9a...  2021-04-02  \n",
       "4     https://www.nfu.edu.cn/xxyw/0d7bd841484a42a69d...  2021-04-02  \n",
       "...                                                 ...         ...  \n",
       "1795  https://www.nfu.edu.cn/xxyw/1eca80f5d69240e491...  2013-10-14  \n",
       "1796  https://www.nfu.edu.cn/xxyw/e2ef39bdace94f3da9...  2013-10-11  \n",
       "1797  https://www.nfu.edu.cn/xxyw/5a530157f3764b32ad...  2013-09-29  \n",
       "1798  https://www.nfu.edu.cn/xxyw/2af0127ce4234c7aa5...  2013-09-29  \n",
       "1799  https://www.nfu.edu.cn/xxyw/b844901be7a6412eb7...  2013-09-26  \n",
       "\n",
       "[1800 rows x 3 columns]"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame( {\n",
    "        \"标题\": title,\n",
    "        \"链结\": [\"https://www.nfu.edu.cn/xxyw/\"+i for i in links],\n",
    "        \"日期\": data,\n",
    "             } )\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "df.to_excel(\"学校要闻.xlsx\", sheet_name=\"南方学院学校要闻\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 校园动态"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "session = HTMLSession()\n",
    "r1 = session.get(\"https://www.nfu.edu.cn/xydt/index.htm\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "title = r1.html.xpath('//div[@class=\"news_title\"]/a/@title')\n",
    "links = r1.html.xpath('//div[@class=\"news_title\"]/a/@href')\n",
    "data = r1.html.xpath('//font[@class=\"right-more\"]/text()')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(84):\n",
    "    r1 = session.get(\"https://www.nfu.edu.cn/xydt/index%d.htm\"%(i))\n",
    "    title.extend(r1.html.xpath('//div[@class=\"news_title\"]/a/@title')) \n",
    "    links.extend(r1.html.xpath('//div[@class=\"news_title\"]/a/@href'))\n",
    "    data.extend(r1.html.xpath('//font[@class=\"right-more\"]/text()'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>链结</th>\n",
       "      <th>日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>【国奖映像】苏绮筠：让优秀成为习惯</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/7dfe6fcd15fd495597...</td>\n",
       "      <td>2021-04-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>【国奖映像】陈宇：心怀热爱，奔赴梦想</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/09627d3243ee4578ac...</td>\n",
       "      <td>2021-04-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>护理与健康学院2020-2021第二学期团员培训课程第2讲圆满结束</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/debea203b0c84a3092...</td>\n",
       "      <td>2021-04-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>护理与健康学院2020-2021年度第二学期3月份团支部委员会顺利举行</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/9ec16bf90e164071b6...</td>\n",
       "      <td>2021-04-09</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>商学院电子商务专业召开申请调整学位授予学科门类 专家评审会</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/cf4420785b9046e998...</td>\n",
       "      <td>2021-04-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1675</td>\n",
       "      <td>勇攀高峰，展望未来——外文系新学期班长会议顺利召开</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/5912160e075c4aa9a0...</td>\n",
       "      <td>2016-03-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1676</td>\n",
       "      <td>走进政商宿舍，走近政商学子——记新学期师生宿舍走访</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/29cb4400d9e44acfbe...</td>\n",
       "      <td>2016-03-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1677</td>\n",
       "      <td>我院会计学系逢甲大学研修专班开训典礼顺利举行</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/fe516b71e79544bb80...</td>\n",
       "      <td>2016-02-29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1678</td>\n",
       "      <td>寒潮不减热情 相聚更显情深——电子通信与软件工程系顺利举办校友交流会</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/30996b733cb74e0e81...</td>\n",
       "      <td>2016-01-28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1679</td>\n",
       "      <td>产教结合，共享双赢——电软系赴企业考察交流</td>\n",
       "      <td>https://www.nfu.edu.cn/xydt/fbe740cdd4534c20af...</td>\n",
       "      <td>2016-01-25</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>1680 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                       标题  \\\n",
       "0                       【国奖映像】苏绮筠：让优秀成为习惯   \n",
       "1                      【国奖映像】陈宇：心怀热爱，奔赴梦想   \n",
       "2       护理与健康学院2020-2021第二学期团员培训课程第2讲圆满结束   \n",
       "3     护理与健康学院2020-2021年度第二学期3月份团支部委员会顺利举行   \n",
       "4           商学院电子商务专业召开申请调整学位授予学科门类 专家评审会   \n",
       "...                                   ...   \n",
       "1675            勇攀高峰，展望未来——外文系新学期班长会议顺利召开   \n",
       "1676            走进政商宿舍，走近政商学子——记新学期师生宿舍走访   \n",
       "1677               我院会计学系逢甲大学研修专班开训典礼顺利举行   \n",
       "1678   寒潮不减热情 相聚更显情深——电子通信与软件工程系顺利举办校友交流会   \n",
       "1679                产教结合，共享双赢——电软系赴企业考察交流   \n",
       "\n",
       "                                                     链结          日期  \n",
       "0     https://www.nfu.edu.cn/xydt/7dfe6fcd15fd495597...  2021-04-09  \n",
       "1     https://www.nfu.edu.cn/xydt/09627d3243ee4578ac...  2021-04-09  \n",
       "2     https://www.nfu.edu.cn/xydt/debea203b0c84a3092...  2021-04-09  \n",
       "3     https://www.nfu.edu.cn/xydt/9ec16bf90e164071b6...  2021-04-09  \n",
       "4     https://www.nfu.edu.cn/xydt/cf4420785b9046e998...  2021-04-07  \n",
       "...                                                 ...         ...  \n",
       "1675  https://www.nfu.edu.cn/xydt/5912160e075c4aa9a0...  2016-03-01  \n",
       "1676  https://www.nfu.edu.cn/xydt/29cb4400d9e44acfbe...  2016-03-01  \n",
       "1677  https://www.nfu.edu.cn/xydt/fe516b71e79544bb80...  2016-02-29  \n",
       "1678  https://www.nfu.edu.cn/xydt/30996b733cb74e0e81...  2016-01-28  \n",
       "1679  https://www.nfu.edu.cn/xydt/fbe740cdd4534c20af...  2016-01-25  \n",
       "\n",
       "[1680 rows x 3 columns]"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df2 = pd.DataFrame( {\n",
    "        \"标题\": title,\n",
    "        \"链结\": [\"https://www.nfu.edu.cn/xydt/\"+i for i in links],\n",
    "        \"日期\": data,\n",
    "             } )\n",
    "df2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "df2.to_excel(\"校园动态.xlsx\", sheet_name=\"南方学院通知公告\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 招投标"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>链结</th>\n",
       "      <th>日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>广州南方学院蚊子、苍蝇、蟑螂消杀及白蚁、红火蚁防治项目招标开标延期公告</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/4aa14103a6d34d42837...</td>\n",
       "      <td>2021-04-08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>广州南方学院蚊子、苍蝇、蟑螂消杀及白蚁、红火蚁防治项目 招标公告</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/ea8754261f26419080a...</td>\n",
       "      <td>2021-04-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>中山大学南方学院数字电路基础实验室、电路与模拟电子实验室设备采购项目招标公告</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/7226fe9acf3b4757b97...</td>\n",
       "      <td>2021-03-31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>中山大学南方学院垃圾清运和处理服务项目招标公告</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/414b2db5e6c04f99be1...</td>\n",
       "      <td>2021-03-17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>中山大学南方学院2021年度维修、改造工程施工项目中标结果公示</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/60c660848ef44283bca...</td>\n",
       "      <td>2021-03-11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>429</td>\n",
       "      <td>中山大学南方学院学生体质健康测试仪采购项目招标公告（第二次）</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/ba01c43761e245d4937...</td>\n",
       "      <td>2015-03-27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>430</td>\n",
       "      <td>中山大学南方学院计算机实验室设备采购项目中标公示</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/0020f85b9ef24d0792d...</td>\n",
       "      <td>2015-03-26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>431</td>\n",
       "      <td>中山大学南方学院电气工程及自动化实验室设备采购项目招标公告（第二次）</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/10482a669fc54447aa2...</td>\n",
       "      <td>2015-03-26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>432</td>\n",
       "      <td>中山大学南方学院音乐楼阶梯课室座椅采购项目中标公示</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/4e5e67a17b7d47cf8cc...</td>\n",
       "      <td>2015-03-20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>433</td>\n",
       "      <td>中山大学南方学院室内高尔夫模拟设备项目招标公告</td>\n",
       "      <td>https://www.nfu.edu.cn/ztb/35a1b4dab36a4ae5aa4...</td>\n",
       "      <td>2013-12-23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>434 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         标题  \\\n",
       "0       广州南方学院蚊子、苍蝇、蟑螂消杀及白蚁、红火蚁防治项目招标开标延期公告   \n",
       "1          广州南方学院蚊子、苍蝇、蟑螂消杀及白蚁、红火蚁防治项目 招标公告   \n",
       "2    中山大学南方学院数字电路基础实验室、电路与模拟电子实验室设备采购项目招标公告   \n",
       "3                   中山大学南方学院垃圾清运和处理服务项目招标公告   \n",
       "4           中山大学南方学院2021年度维修、改造工程施工项目中标结果公示   \n",
       "..                                      ...   \n",
       "429          中山大学南方学院学生体质健康测试仪采购项目招标公告（第二次）   \n",
       "430                中山大学南方学院计算机实验室设备采购项目中标公示   \n",
       "431      中山大学南方学院电气工程及自动化实验室设备采购项目招标公告（第二次）   \n",
       "432               中山大学南方学院音乐楼阶梯课室座椅采购项目中标公示   \n",
       "433                 中山大学南方学院室内高尔夫模拟设备项目招标公告   \n",
       "\n",
       "                                                    链结          日期  \n",
       "0    https://www.nfu.edu.cn/ztb/4aa14103a6d34d42837...  2021-04-08  \n",
       "1    https://www.nfu.edu.cn/ztb/ea8754261f26419080a...  2021-04-02  \n",
       "2    https://www.nfu.edu.cn/ztb/7226fe9acf3b4757b97...  2021-03-31  \n",
       "3    https://www.nfu.edu.cn/ztb/414b2db5e6c04f99be1...  2021-03-17  \n",
       "4    https://www.nfu.edu.cn/ztb/60c660848ef44283bca...  2021-03-11  \n",
       "..                                                 ...         ...  \n",
       "429  https://www.nfu.edu.cn/ztb/ba01c43761e245d4937...  2015-03-27  \n",
       "430  https://www.nfu.edu.cn/ztb/0020f85b9ef24d0792d...  2015-03-26  \n",
       "431  https://www.nfu.edu.cn/ztb/10482a669fc54447aa2...  2015-03-26  \n",
       "432  https://www.nfu.edu.cn/ztb/4e5e67a17b7d47cf8cc...  2015-03-20  \n",
       "433  https://www.nfu.edu.cn/ztb/35a1b4dab36a4ae5aa4...  2013-12-23  \n",
       "\n",
       "[434 rows x 3 columns]"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "session = HTMLSession()\n",
    "r3 = session.get(\"https://www.nfu.edu.cn/ztb/index.htm\")\n",
    "\n",
    "title = r3.html.xpath('//div[@class=\"news_title\"]/a/@title')\n",
    "links = r3.html.xpath('//div[@class=\"news_title\"]/a/@href')\n",
    "data = r3.html.xpath('//font[@class=\"right-more\"]/text()')\n",
    "\n",
    "for i in range(100):\n",
    "    r3 = session.get(\"https://www.nfu.edu.cn/ztb/index%d.htm\"%(i))\n",
    "    title.extend(r3.html.xpath('//div[@class=\"news_title\"]/a/@title')) \n",
    "    links.extend(r3.html.xpath('//div[@class=\"news_title\"]/a/@href'))\n",
    "    data.extend(r3.html.xpath('//font[@class=\"right-more\"]/text()'))\n",
    "    \n",
    "df3 = pd.DataFrame( {\n",
    "        \"标题\": title,\n",
    "        \"链结\": [\"https://www.nfu.edu.cn/ztb/\"+i for i in links],\n",
    "        \"日期\": data,\n",
    "             } )\n",
    "df3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "df3.to_excel(\"招投标.xlsx\", sheet_name=\"南方学院招投标\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 高教动态"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>链结</th>\n",
       "      <th>日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>教育部党组《求是》撰文：精心谋划 切实抓好教育系统党史学习教育</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/309be8b078444044b5...</td>\n",
       "      <td>2021-04-08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>教育部长陈宝生：把巩固拓展作为开局之年工作主题，做到6个到位</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/159b20971f8b4051ba...</td>\n",
       "      <td>2021-03-20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>如何建设高质量教育体系？“十四五”规划和2035年远景目标纲要明确了</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/27ba495edc1b49f88b...</td>\n",
       "      <td>2021-03-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>教育部长陈宝生《旗帜》撰文：建设高质量教育体系，加快建成教育强国</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/20dc120c250642cca5...</td>\n",
       "      <td>2021-01-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>重磅！《推进粤港澳大湾区高等教育合作发展规划》正式印发</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/b43531427fb44695bb...</td>\n",
       "      <td>2020-12-22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>508</td>\n",
       "      <td>广东省教育厅：今年毕业生就业形势比去年好</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/3829e4c5df9e460abc...</td>\n",
       "      <td>2014-03-28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>509</td>\n",
       "      <td>要求职业“高大上” 高校毕业生择业扎堆致就业难</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/776ebc41fae84b36a4...</td>\n",
       "      <td>2014-03-27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>510</td>\n",
       "      <td>教育部：预计今年贫困地区农村学生上重点高校的人数将比去年增加10%以上</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/41d339ccb3a0464c9c...</td>\n",
       "      <td>2014-03-25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>511</td>\n",
       "      <td>学位论文如何才能挤出“水分”</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/1e8fa309bcf847b6ad...</td>\n",
       "      <td>2014-03-24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>512</td>\n",
       "      <td>高校低年级学生频繁试水招聘会 专家：鼓励提前预热</td>\n",
       "      <td>https://www.nfu.edu.cn/gjdt/3f34245a7cb449c99b...</td>\n",
       "      <td>2013-03-31</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>513 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                      标题  \\\n",
       "0        教育部党组《求是》撰文：精心谋划 切实抓好教育系统党史学习教育   \n",
       "1         教育部长陈宝生：把巩固拓展作为开局之年工作主题，做到6个到位   \n",
       "2     如何建设高质量教育体系？“十四五”规划和2035年远景目标纲要明确了   \n",
       "3       教育部长陈宝生《旗帜》撰文：建设高质量教育体系，加快建成教育强国   \n",
       "4            重磅！《推进粤港澳大湾区高等教育合作发展规划》正式印发   \n",
       "..                                   ...   \n",
       "508                 广东省教育厅：今年毕业生就业形势比去年好   \n",
       "509              要求职业“高大上” 高校毕业生择业扎堆致就业难   \n",
       "510  教育部：预计今年贫困地区农村学生上重点高校的人数将比去年增加10%以上   \n",
       "511                       学位论文如何才能挤出“水分”   \n",
       "512             高校低年级学生频繁试水招聘会 专家：鼓励提前预热   \n",
       "\n",
       "                                                    链结          日期  \n",
       "0    https://www.nfu.edu.cn/gjdt/309be8b078444044b5...  2021-04-08  \n",
       "1    https://www.nfu.edu.cn/gjdt/159b20971f8b4051ba...  2021-03-20  \n",
       "2    https://www.nfu.edu.cn/gjdt/27ba495edc1b49f88b...  2021-03-15  \n",
       "3    https://www.nfu.edu.cn/gjdt/20dc120c250642cca5...  2021-01-05  \n",
       "4    https://www.nfu.edu.cn/gjdt/b43531427fb44695bb...  2020-12-22  \n",
       "..                                                 ...         ...  \n",
       "508  https://www.nfu.edu.cn/gjdt/3829e4c5df9e460abc...  2014-03-28  \n",
       "509  https://www.nfu.edu.cn/gjdt/776ebc41fae84b36a4...  2014-03-27  \n",
       "510  https://www.nfu.edu.cn/gjdt/41d339ccb3a0464c9c...  2014-03-25  \n",
       "511  https://www.nfu.edu.cn/gjdt/1e8fa309bcf847b6ad...  2014-03-24  \n",
       "512  https://www.nfu.edu.cn/gjdt/3f34245a7cb449c99b...  2013-03-31  \n",
       "\n",
       "[513 rows x 3 columns]"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "session = HTMLSession()\n",
    "r4 = session.get(\"https://www.nfu.edu.cn/gjdt/index.htm\")\n",
    "\n",
    "title = r4.html.xpath('//div[@class=\"news_title\"]/a/@title')\n",
    "links = r4.html.xpath('//div[@class=\"news_title\"]/a/@href')\n",
    "data = r4.html.xpath('//font[@class=\"right-more\"]/text()')\n",
    "\n",
    "for i in range(100):\n",
    "    r4 = session.get(\"https://www.nfu.edu.cn/gjdt/index%d.htm\"%(i))\n",
    "    title.extend(r4.html.xpath('//div[@class=\"news_title\"]/a/@title')) \n",
    "    links.extend(r4.html.xpath('//div[@class=\"news_title\"]/a/@href'))\n",
    "    data.extend(r4.html.xpath('//font[@class=\"right-more\"]/text()'))\n",
    "    \n",
    "df4 = pd.DataFrame( {\n",
    "        \"标题\": title,\n",
    "        \"链结\": [\"https://www.nfu.edu.cn/gjdt/\"+i for i in links],\n",
    "        \"日期\": data,\n",
    "             } )\n",
    "df4"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "df4.to_excel(\"高校动态.xlsx\", sheet_name=\"南方学院高校动态\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 通知公告"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>链结</th>\n",
       "      <th>日期</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>0</td>\n",
       "      <td>校园管理部关于2021年元旦放假校园生活服务安排的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/cd60e06378e5449294...</td>\n",
       "      <td>2020-12-25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>1</td>\n",
       "      <td>中山大学南方学院关于2021年元旦放假安排的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/16fcbd56eab04220b3...</td>\n",
       "      <td>2020-12-17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>2</td>\n",
       "      <td>关于开展2020年知识产权竞赛的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/155655d4a7e74c7695...</td>\n",
       "      <td>2020-12-16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>3</td>\n",
       "      <td>中山大学南方学院关于举办2020年预防艾滋病巡讲活动的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/f381db0e5b3e4746b3...</td>\n",
       "      <td>2020-12-03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>4</td>\n",
       "      <td>关于开展2020年安全知识竞赛的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/ae83ecc6ce894bcb81...</td>\n",
       "      <td>2020-12-03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>682</td>\n",
       "      <td>“南苑青年”系列讲座之第十三讲的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/bbd14d55a99247a79f...</td>\n",
       "      <td>2015-04-08</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>683</td>\n",
       "      <td>中山大学南方学院关于举办“南方湖畔·艺彩纷呈”第七届校园文化艺术节活动通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/a8e5e752e409486da2...</td>\n",
       "      <td>2015-04-07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>684</td>\n",
       "      <td>学院办公室关于2015年五一放假安排的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/e3f763049ee54cfc8c...</td>\n",
       "      <td>2015-04-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>685</td>\n",
       "      <td>中山大学南方学院关于2015年公共机构节能宣传作品征集活动的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/f3ae1aa3ccdb4d87bc...</td>\n",
       "      <td>2015-04-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>686</td>\n",
       "      <td>关于开展校园网络和运营商移动网络使用情况调查的通知</td>\n",
       "      <td>https://www.nfu.edu.cn/tzgg/6de44f6a618540ef82...</td>\n",
       "      <td>1970-01-01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>687 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        标题  \\\n",
       "0              校园管理部关于2021年元旦放假校园生活服务安排的通知   \n",
       "1                 中山大学南方学院关于2021年元旦放假安排的通知   \n",
       "2                       关于开展2020年知识产权竞赛的通知   \n",
       "3            中山大学南方学院关于举办2020年预防艾滋病巡讲活动的通知   \n",
       "4                       关于开展2020年安全知识竞赛的通知   \n",
       "..                                     ...   \n",
       "682                     “南苑青年”系列讲座之第十三讲的通知   \n",
       "683  中山大学南方学院关于举办“南方湖畔·艺彩纷呈”第七届校园文化艺术节活动通知   \n",
       "684                  学院办公室关于2015年五一放假安排的通知   \n",
       "685       中山大学南方学院关于2015年公共机构节能宣传作品征集活动的通知   \n",
       "686              关于开展校园网络和运营商移动网络使用情况调查的通知   \n",
       "\n",
       "                                                    链结          日期  \n",
       "0    https://www.nfu.edu.cn/tzgg/cd60e06378e5449294...  2020-12-25  \n",
       "1    https://www.nfu.edu.cn/tzgg/16fcbd56eab04220b3...  2020-12-17  \n",
       "2    https://www.nfu.edu.cn/tzgg/155655d4a7e74c7695...  2020-12-16  \n",
       "3    https://www.nfu.edu.cn/tzgg/f381db0e5b3e4746b3...  2020-12-03  \n",
       "4    https://www.nfu.edu.cn/tzgg/ae83ecc6ce894bcb81...  2020-12-03  \n",
       "..                                                 ...         ...  \n",
       "682  https://www.nfu.edu.cn/tzgg/bbd14d55a99247a79f...  2015-04-08  \n",
       "683  https://www.nfu.edu.cn/tzgg/a8e5e752e409486da2...  2015-04-07  \n",
       "684  https://www.nfu.edu.cn/tzgg/e3f763049ee54cfc8c...  2015-04-01  \n",
       "685  https://www.nfu.edu.cn/tzgg/f3ae1aa3ccdb4d87bc...  2015-04-01  \n",
       "686  https://www.nfu.edu.cn/tzgg/6de44f6a618540ef82...  1970-01-01  \n",
       "\n",
       "[687 rows x 3 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "session = HTMLSession()\n",
    "r5 = session.get(\"https://www.nfu.edu.cn/tzgg/index.htm\")\n",
    "\n",
    "title = r5.html.xpath('//div[@class=\"news_title\"]/a/@title')\n",
    "links = r5.html.xpath('//div[@class=\"news_title\"]/a/@href')\n",
    "data = r5.html.xpath('//font[@class=\"right-more\"]/text()')\n",
    "\n",
    "for i in range(100):\n",
    "    r5 = session.get(\"https://www.nfu.edu.cn/tzgg/index%d.htm\"%(i))\n",
    "    title.extend(r5.html.xpath('//div[@class=\"news_title\"]/a/@title')) \n",
    "    links.extend(r5.html.xpath('//div[@class=\"news_title\"]/a/@href'))\n",
    "    data.extend(r5.html.xpath('//font[@class=\"right-more\"]/text()'))\n",
    "    \n",
    "df5 = pd.DataFrame( {\n",
    "        \"标题\": title,\n",
    "        \"链结\": [\"https://www.nfu.edu.cn/tzgg/\"+i for i in links],\n",
    "        \"日期\": data,\n",
    "             } )\n",
    "df5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "df5.to_excel(\"通知公告.xlsx\", sheet_name=\"南方学院高校动态\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
